package sk.stuba.fiit.ltasys.web.mvc.model.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import sk.stuba.fiit.ltasys.web.mvc.model.service.ActualizeCrlJob;
import sk.stuba.fiit.ltasys.web.mvc.model.service.CrlService;

public class ActualizeCrlJobImpl implements ActualizeCrlJob{

	@Autowired
	private CrlService crlService;
	
	public void execute() {
		try{
			System.out.println("Actualize crl");
			if(crlService.downloadNewCrl()){
				System.out.println("New Crl was add to database");
			}
			System.out.println("Databaze was actualized");
		}catch(Exception e){
			
		}
			
	}
}
